package cn.hdu.liang.polymorphism;

class A {
    public void a1() {
        System.out.print("it's a1 ");
        a2();
    }

    public void a2() {
        System.out.println("A.a2");
    }
}

class B extends A {
    @Override
    public void a2() {
        System.out.println("B.a2");
    }
}

public class Exam10 {
    public static void main(String[] args) {
        A b = new B();
        b.a1();
    }
}
